package com.xmy.cultivate.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xmy.cultivate.entity.DormRoom;
import com.xmy.cultivate.mapper.DormRoomMapper;
import com.xmy.cultivate.service.IDormRoomService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.util.List;

/**
 * <p>
 * 宿舍 服务实现类
 * </p>
 *
 * @author hpiggy
 * @since 2025-03-02
 */
@Service
public class DormRoomServiceImpl extends ServiceImpl<DormRoomMapper, DormRoom> implements IDormRoomService {

    @Autowired
    DormRoomMapper dormRoomMapper;
    @Override
    public IPage<DormRoom> getDormRoomList(IPage<DormRoom> page, String areaId, String sexType, String status, String name, String dueStatus, LocalDate currentDate) {
        return dormRoomMapper.getDormRoomList(page,areaId,sexType,status,name, dueStatus, currentDate);
    }

    @Override
    public List<DormRoom> getDormRoomManagerList(String SexType) {
        return dormRoomMapper.getDormRoomManagerList(SexType);
    }

    @Override
    public List<DormRoom> getDormRoomManagerListById(String id) {
        return dormRoomMapper.getDormRoomManagerListById(id);
    }
}
